Repository navigation
Support RISC-V resource scopes and rebalance compiler CI - #36
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
RV32 and RV64 now execute scope-bound with-expressions. Lower them before reachability, closure capture and frame sizing into ordinary bindings and a close continuation. Acquire once, retain the body result across cleanup, preserve LIFO order and keep calls from bypassing cleanup through tail-call emission. Existing failure propagation remains: closes run after normal return, with no exception finalization. OwnedVec storage keeps the target's arena lifetime.
The complete factory fixture now executes on both RISC-V widths. Add a scope fixture covering generated-name collisions, captured closes, source shadowing, parameterized Drop records, sixteen nested resources that spill frame bindings, result values and caught/escaping failures. Hosted boundary checks require both fixtures to compile, exit successfully and match explicit output oracles at both widths; they cannot silently become allowed corpus refusals.
The scope fixture also fixes existing backend defects: Wasm loads close fields with the current eight-byte record layout, wraps pointers for memory accesses and supplies i64 closure arguments; LLVM extracts close from the instantiated record aggregate and uses the current i64 unit calling convention.
Move the README execution gate from compiler to containers. Retain its forced full-suite rerun, README transcript and newcomer-program check, along with the separate compiler unit-suite step. Pin the gate's name, command and destination in the routing validator and require dune in the containers preflight. Keep all 191 gates, nine groups, four build configurations and the existing required-check name.
Validation
Hosted PR CI passes all 17 jobs and all 191 gates, once each in their assigned group. Execution logs confirm the moved README gate, both unit-suite checks, all 251 parity programs, all 84 snapshot refusals, all three real RISC-V modes and the four required factory/scope oracle runs. RV32 has 222 agreements and seven expected differences; RV64 has 246 agreements and two expected differences.
Merged-main CI also passes all 17 jobs and all 191 gates on the merged source. All execution markers are verified again, and Pages builds and deploys that same commit. The merged tree matches the tested PR tree.
These individual runs vary with setup, cache state and runner load. An overall reduction is observed in these runs, while a stable compiler-group speedup is not established. The gate transfer retains every verification. Focused paired local compilation of three unchanged inputs at RV32/RV64 has medians of 0.93–1.01 times the published v0.1.712 compiler; that sample does not establish hosted-job throughput.
These changes are unreleased. Published v0.1.712 was built and independently verified from its separate reviewed release source.